package com.yuncheng.spcyApi.constant.jcy;

/**
 * 聘任登记
 * @author hua
 */
public class JcyPrdjConstant {

    // 聘任登记-聘任状态
    public final static String PR_PRZTS = "拟聘登记,公示登记,聘任登记,完成";
//    public final static String PR_JHZT_JHQC = "拟聘登记";
    public final static String PR_JHZT_JHSH = "公示登记";
    public final static String PR_JHZT_PRDJ = "聘任登记";
    public final static String PR_JHZT_PRWC = "完成";

    // 聘任登记-手动添加人员
    public final static String PR_RYMD_SFSDTJ_YES = "是";
    public final static String PR_RYMD_SFSDTJ_NO = "否";

    public final static String PR_SDTJRY_SFSQZH_TJ = "新增";
    public final static String PR_SDTJRY_SFSQZH_ZXBYX = "注销变有效";
    public final static String PR_SDTJRY_SFSQZH_YBJCYBZY = "预备检查员变组员";
    public final static String PR_SDTJRY_SFSQZH_YBJCYBZY_ZXBYX = "预备检查员变组员-注销变有效";
    public final static String PR_SDTJRY_SFSQZH_ZYBZZ = "组员变组长";
    public final static String PR_SDTJRY_SFSQZH_ZYBZZ_ZXBYX = "组员变组长-注销变有效";

    // 聘任登记-聘任状态-第一个状态
    public static String getFirstPrzt(){
        return PR_PRZTS.split(",")[0];
    }

    // 获取聘任登记-聘任状态状态-下一个状态
    public static String getNextPrZt(String nowZt){
        String nodeNameList[] = PR_PRZTS.split(",");
        for (int i=0; i<nodeNameList.length; i++){
            if (nodeNameList[i].equals(nowZt)){
                if (i == nodeNameList.length-1){
                    return nowZt;
                }else {
                    return nodeNameList[i+1];
                }
            }
        }
        return "";
    }

    // 获取聘任登记-聘任状态状态-上一个状态
    public static String getPreviousPrZt(String nowZt){
        String[] nodeNameList = PR_PRZTS.split(",");

        for (int i=0; i<nodeNameList.length; i++){
            if (nodeNameList[i].equals(nowZt)){
                if (i==0){
                    return nodeNameList[i];
                }else {
                    int perviousI = i-1; // 上一个环节名称
                    return nodeNameList[perviousI];
                }
            }
        }
        return "";
    }

    // 解聘登记人员- 解聘状态
    public final static String JP_JPZT_DJP = "待解聘";
    public final static String JP_JPZT_YJP = "已解聘";
//    public final static String JP_JPZT_YHF = "已恢复";

    // 解聘登记-是否自动生成人员
    public final static String JP_SFZDSCRY_YES = "是";
    public final static String JP_SFZDSCRY_NO = "否";

    /** 解聘登记-状态*/
    public final static String JPDJ_JPZT_JPDJ = "解聘登记";
    public final static String JPDJ_JPZT_JPWC = "解聘完成";

}
